<?php get_header(); ?>


        <div class="blocLeft">
             <?php if (have_posts()) : ?>
              <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
               <?php /* If this is a category archive */ if (is_category()) { ?>
		<div class="infobox segoeLi">Archive of category &#8216;<?php single_cat_title(); ?>&#8217;<span><br><?php echo category_description(); ?></span></div>
 	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
      <div class="infobox segoeLi">Archive of tag &#8216;<?php single_tag_title(); ?>&#8217;</div>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
 	    <div class="infobox segoeLi">Archive of daily &#8216;<?php the_time('F jS, Y'); ?>&#8217;</div>
 	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
      <div class="infobox segoeLi">Archive of monthly &#8216;<?php the_time('F, Y'); ?>&#8217;</div>
 	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
      <div class="infobox segoeLi">Archive of monthly &#8216;<?php the_time('Y'); ?>&#8217;</div>
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
      <div class="infobox segoeLi">Archive of author;</div>
 	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
	   <div class="infobox segoeLi">Archive of blog;</div>
 	  <?php } ?>
		<!--<a href="<?php bloginfo('url'); ?>/">« 返回博客</a>-->



            <div id="dle-content">

            <?php while (have_posts()) : the_post(); ?>
                <div class="article">
                	<div class="categ segoeLi"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/category.png" width="16" height="16"><?php the_category(', ');?></div>
                	<h2 class="segoeLi"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                    <div class="articleAuthor">Post by <?php the_author_posts_link() ?> &nbsp;at&nbsp; <?php the_time('F jS, Y') ?></div>
                    <div class="imgArticle">
                    	<div class="scrollImgArticle">
                    	<img src="<?php
							if ( get_post_meta(get_the_ID(), 'thumbpic', true) ) {
    							echo get_post_meta(get_the_ID(), 'thumbpic', true);
							} else {
								echo bloginfo( 'stylesheet_directory' ).'/images/defaultpic.jpg';
							}
							?>
							" height="140" width="628">
                        <span style="display: none;"><?php the_tags(); ?></span>
                        </div>
                    </div>
                    <?php the_content(' '); ?>
                    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »','nbComments linkMore segoeLi'); ?>

                    <a class="moreInfos linkMore segoeLi" href="<?php the_permalink() ?>">Read more</a>
                    <div class="clear"></div>
                </div>

                    <?php endwhile; ?>
                <ul class="pagination segoeLi">
                	<li class="pagePrec">&nbsp;<?php next_posts_link('Prec') ?></li>
                    <li class="pageSuiv">&nbsp;<?php previous_posts_link('Next') ?></li>
                </ul>
                	<?php else :

		if ( is_category() ) { // If this is a category archive
			printf("<div class=\"infobox segoeLi\">Sorry but have no archive by category &#8216;%s&#8217;</div>", single_cat_title('',false));
		} else if ( is_date() ) { // If this is a date archive
			echo("<div class=\"infobox segoeLi\">Sorry but have no archive by the date;</div>");
		} else if ( is_author() ) { // If this is a category archive
			$userdata = get_userdatabylogin(get_query_var('author_name'));
			printf("<div class=\"infobox segoeLi\">Sorry but have no archive by &#8216;%s&#8217; </div>", $userdata->display_name);
		} else {
			echo("<div class=\"infobox segoeLi\">No archive found;</div>");
		}

              	endif;?>



            </div>

            </div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>